package com.sls.mall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sls.common.utils.PageUtils;
import com.sls.mall.product.entity.AttrGroupEntity;
import com.sls.mall.product.vo.AttrGroupWithAttrsVo;
import com.sls.mall.product.vo.SpuItemAttrGroupVo;

import java.util.List;
import java.util.Map;

/**
 * 属性分组
 *
 * @author Gesx
 * @email 759065243@qq.com
 * @date 2021-05-13 17:13:10
 */
public interface AttrGroupService extends IService<AttrGroupEntity> {

    PageUtils queryPage(Map<String, Object> params);

    PageUtils queryPage(Map<String, Object> params, Long catelogId);

    /**
     * 获取分类下所有分组及每个分组下的属性
     * @param catelogId
     * @return
     */
    List<AttrGroupWithAttrsVo> getAttrGroupWithAttrs(Long catelogId);

    /**
     * 根据spuId查询属性分组
     * @param spuId
     * @param catalogId
     * @return
     */
    List<SpuItemAttrGroupVo> getAttrGroupWithAttrsBySpuId(Long spuId, Long catalogId);
}

